# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=remmina
pkgver=1.4.7
pkgrel=0
pkgdesc="Remmina is a remote desktop client written in GTK+"
url="https://www.remmina.org/"
arch="all"
license="GPL-2.0-or-later"
makedepends="gtk+3.0-dev intltool zlib-dev libjpeg-turbo-dev gnutls-dev
	vte3-dev libgcrypt-dev libssh-dev libxkbfile-dev freerdp-dev
	avahi-ui-dev libvncserver-dev cmake json-glib-dev libsoup-dev
	openssl-dev libsodium-dev libsecret-dev"
replaces="remmina-plugins"
subpackages="$pkgname-dev $pkgname-lang $pkgname-doc"
source="https://gitlab.com/Remmina/Remmina/-/archive/v$pkgver/Remmina-v$pkgver.tar.gz
	remmina-1.0.0-dsofix.patch
	libintl-underlink.patch
	"
options="!check" # No test suite available
builddir="$srcdir"/Remmina-v$pkgver

build() {
	LDFLAGS="$LDFLAGS -lintl" \
	cmake -DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DWITH_APPINDICATOR=OFF \
		-DWITH_AVAHI=ON \
		-DWITH_FREERDP=ON \
		-DWITH_GCRYPT=ON \
		-DWITH_LIBSSH=ON \
		-DWITH_PTHREAD=ON \
		-DWITH_TELEPATHY=OFF \
		-DWITH_VTE=ON \
		-DWITH_ZLIB=ON \
		-DWITH_KF5WALLET=ON \
		-DWITH_CUPS=OFF \
		-DWITH_LIBSECRET=ON
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="ebe1e62e090062107ed6674d494255bac9e3d175553bc5ae949aa1bfc9e1de4b59f35f523ee36b08bb02580513d3b585344b9864001dd991cac656f1c13116e9  Remmina-v1.4.7.tar.gz
8c06cfb4cd7eb74f641d6524c2fb5c941022df1d3f428c9f57a88b9714ec602b0baf962a9947aa83de3ccfaed237956743b4eb0083c4dde0cc9740b958bba007  remmina-1.0.0-dsofix.patch
1921b13bd3871e602690b795fb2864eef0326ecee2df021a2f190131efb2b882ecf14428d2faadd4896a215112fd775b94eba6338164c079c4355748a74146f8  libintl-underlink.patch"
